curl -X PUT http://127.0.0.1:9200/media/_settings?pretty=true -d '{
 "analysis": {
   "analyzer": {
     "index_default" : {
       "type": " custom ",
       "tokenizer" : "ik_max_word_token",
       "filter" : ["standard", "lowercase", "my_stemmer"]
     },
     "search_default" : {
       "type": " custom ",
       "tokenizer" : "ik_max_word_token",
       "filter" : ["standard", "lowercase", "my_stemmer"]
     },
     "default" : {
       "type": " custom ",
       "tokenizer" : "ik_max_word_token",
       "filter" : ["standard", "lowercase", "my_stemmer"]
     },

     "ik_max_word": {
       "type": " custom ",
	     "tokenizer" : "ik_max_word_token"
     },
     "ik_smart" : {
		   "type" : " custom ",
		   "tokenizer" : "ik_smart_token"
     },
     "ik_max_word_syno": {
       "type" : "custom",
       "tokenizer" : "ik_max_word_token",
       "filter" : ["my_synonym"]
     },
     "ik_smart_syno": {
       "type" : "custom",
       "tokenizer" : "ik_smart_token",
       "filter" : ["my_synonym"]
     },
     "ik_max_word_hyper": {
       "type" : "custom",
       "tokenizer" : "ik_max_word_token",
       "filter" : ["my_hypernym"]
     },
     "ik_smart_hyper": {
       "type" : "custom",
       "tokenizer" : "ik_smart_token",
       "filter" : ["my_hypernym"]
     },
     "ik_max_word_hypo": {
       "type" : "custom",
       "tokenizer" : "ik_max_word_token",
       "filter" : ["my_hyponym"]
     },
     "ik_smart_hypo": {
       "type" : "custom",
       "tokenizer" : "ik_smart_token",
       "filter" : ["my_hyponym"]
     },
     "ik_max_word_simi": {
       "type" : "custom",
       "tokenizer" : "ik_max_word_token",
       "filter" : ["my_similar"]
     },
     "ik_smart_simi": {
       "type" : "custom",
       "tokenizer" : "ik_smart_token",
       "filter" : ["my_similar"]
     }
   },

   "tokenizer" : {
     "ik_max_word_token" : {
       "type" : "ik",
       "use_smart" : false
     },
     "ik_smart_token" : {
       "type" : "ik",
       "use_smart" : true
     }
   },

   "filter" : {
     "my_synonym" : {
       "type" : "synonym",
       "synonyms_path" : "semantic/synonym.txt"
     },
     "my_hypernym" : {
       "type" : "synonym",
       "synonyms_path" : "semantic/hypernym.txt"
     },
     "my_hyponym" : {
       "type" : "synonym",
       "synonyms_path" : "semantic/hyponym.txt"
     },
     "my_similar" : {
       "type" : "synonym",
       "synonyms_path" : "semantic/similar.txt"
     },
     "my_stemmer" : {
       "type" : "stemmer",
       "name" : "english"
     }
   }
 }

}
'

